const express = require('express')
const router = express.Router();

const {deleteFile,downloadFile,getFileList, uploadFile} = require('../controllers/file')
const verifyToken = require("../utils/jwt");

router.get("/api/file/download/:id", downloadFile);
router.delete("/api/file/delete/:id", deleteFile);
router.post("/api/file/upload", verifyToken,...uploadFile);// 解构使用
router.get("/api/file/list", verifyToken,getFileList);

module.exports = router;
